package com.stm.bi.dto.query;

import com.stm.framework.annotation.ReqParam;
import lombok.Data;
import lombok.experimental.Accessors;


/**
 * 科目-页面查询入参对象
 *
 * @author qinyongjie
 * @date 2025-05-22
 */
@Data
@Accessors(chain = true)
public class SubjectPageQry {

    @ReqParam(label = "科目名称")
    private String name;

    @ReqParam(label = "归属分类ID")
    private Long categoryId;

    @ReqParam(label = "页面大小", max = 500)
    private Integer pageSize = 20;
    @ReqParam(label = "页面编号")
    private Integer pageNum = 1;

    // 自定义setter方法，自动去除前后空格
    public SubjectPageQry setName(String name) {
        this.name = name != null ? name.trim() : null;
        return this;
    }

}